package org.marsson.bNav;

import java.awt.Robot;

public class MouseMovements {

	/**
	 * main(args[]) method
	 * 
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {

		// create a new instance, automation event generator
		Robot robot = new Robot();

		// location co-ordinated
		int x = 0;
		int y = 0;
		int steps = 2;

		// move the mouse to location
		// the mouse would move diagonally across the screen
		for (int i = 0; i < steps; i++) {
			// move mouse to location
			robot.mouseMove(x, y);
			System.out.println("Mouse at : " + x + "," + y);

			robot.delay(1000); // introduce delay to see the movements

			// increment the co-ordinates
			x = x + 200;
			y = y + 500;

		}

		// scroll the wheel
		// depending on the activate window, it would scroll up and down
		// say 100 units
		robot.mouseWheel(100);
		robot.mouseWheel(-100);

	}
}